function newUser() {
	var form = $('form.new');
	form.find('input#password').attr('value',prompt('password'));
	form.submit();
	
}

$(document).ready(function() {
	$('form.new input[type=text]:first').focus();

	var color_inputs = $('input.type_color');
	if (color_inputs.length)
		color_inputs.ColorPicker({
			onSubmit: function(hsb, hex, rgb, el) {
				$(el).val(hex).css('background-color','#'+hex).ColorPickerHide();
			},
			onBeforeShow: function () {
				$(this).ColorPickerSetColor(this.value);
			}
		})
		.bind('keyup', function(){
			$(this).ColorPickerSetColor(this.value);
		});

	Date.firstDayOfWeek = 0;
	Date.format = 'yyyy-mm-dd';	
	var date_inputs = $('input.type_date');
	if (date_inputs.length)
		date_inputs.datePicker({startDate:'1900-01-01'});
});